<?php
namespace app\common\model;

class TagMessage extends Common {

   protected function getAlldataAttr($value, $data) {
       $data['tagname'] = model('Tag')->where('id', $data['tagid'])->value('tagname');
       $data['title'] = model('Message')->where('id', $data['messageid'])->value('title');
       $data['content'] = model('Message')->where('id', $data['messageid'])->value('content');
       $data['status'] = model('Message')->where('id', $data['messageid'])->value('status');
       $data['addtime'] = date("Y-m-d H:i", model('Message')->where('id', $data['messageid'])->value('addtime'));
       $data['send_realname'] = model('AdminUser')->where('userid', model('Message')->where('id', $data['messageid'])->value('send_user'))->value('realname');
       return $data;
   }
}
